package com.xintoucloud.pbs.entity;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;

@Entity@Table(name="p_organization")
public class Organization implements Serializable{
    @Id@GeneratedValue(strategy=GenerationType.IDENTITY)
	private int oid;
	private String oname;
	private String bname;
	private String linkman;
	private String ophone;
	private String otype;
	private String address;
	private int adminid;
	private int parentid;
	private String membersList;
	private String coordinate;

	public String getCoordinate() {
		return coordinate;
	}
	public void setCoordinate(String coordinate) {
		this.coordinate = coordinate;
	}
	@ManyToOne(targetEntity = OrganizationState.class)
	@JoinColumn(name="ostid",unique=true,referencedColumnName="ostid")
	private OrganizationState ost;  //组织状态
	
	@ManyToOne(targetEntity = OrganizationStage.class)
	@JoinColumn(name="osgid",unique=true,referencedColumnName="osgid")
	private OrganizationStage osg;  //组织级别
	
	
	
	public OrganizationState getOst() {
		return ost;
	}
	public void setOst(OrganizationState ost) {
		this.ost = ost;
	}
	public OrganizationStage getOsg() {
		return osg;
	}
	public void setOsg(OrganizationStage osg) {
		this.osg = osg;
	}
	public int getOid() {
		return oid;
	}
	public void setOid(int oid) {
		this.oid = oid;
	}
	public String getOname() {
		return oname;
	}
	public void setOname(String oname) {
		this.oname = oname;
	}
	public String getBname() {
		return bname;
	}
	public void setBname(String bname) {
		this.bname = bname;
	}
	public String getLinkman() {
		return linkman;
	}
	public void setLinkman(String linkman) {
		this.linkman = linkman;
	}
	public String getOphone() {
		return ophone;
	}
	public void setOphone(String ophone) {
		this.ophone = ophone;
	}
	public String getOtype() {
		return otype;
	}
	public void setOtype(String otype) {
		this.otype = otype;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public int getAdminid() {
		return adminid;
	}
	public void setAdminid(int adminid) {
		this.adminid = adminid;
	}
	public int getParentid() {
		return parentid;
	}
	public void setParentid(int parentid) {
		this.parentid = parentid;
	}
	public String getMembersList() {
		return membersList;
	}
	public void setMembersList(String membersList) {
		this.membersList = membersList;
	}
	
}
